home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 48 / Amiga Format CD48 (1999-12-13)(Future Publishing)(GB)(Track 1 of 2)[!][issue 2000-01].iso / -websites- / whdload / games / pinkie.lha / Pinkie / Install_Pinkie next >
Text File  |  1999-09-29  |  3KB  |  164 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "PinkieData")        ;sub directory containing data files
  4. (set #readme-file "pinkiehd.readme")    ;name of readme file
  5. (set #cleanup "")        ;files to delete after install
  6.  
  7. ;****************************
  8.  
  9. ;----------------------------
  10. ; Checks if given program is reachable via the path
  11. ; if not abort install
  12. ; IN:  #program - to check
  13. ; OUT: -
  14.  
  15. (procedure P_chkrun
  16.   (if
  17.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  18.     ("")
  19.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the WHDLoad package." #program))
  20.   )
  21. )
  22.  
  23. ;----------------------------
  24. ;****************************
  25.  
  26. (if
  27.   (exists #readme-file)
  28.   (if
  29.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  30.     ("")
  31.     (run ("SYS:Utilities/More %s" #readme-file))
  32.   )
  33. )
  34.  
  35. (set #program "WHDLoad")
  36. (P_chkrun)
  37.  
  38. (set @default-dest
  39.   (askdir
  40.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  41.     (help @askdir-help)
  42.     (default @default-dest)
  43.     (disk)
  44.   )
  45. )
  46. (set #dest (tackon @default-dest @app-name))
  47. (if
  48.   (exists #dest)
  49.   (
  50.     (set #choice
  51.       (askbool
  52.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  53.         (default 1)
  54.         (choices "Delete" "Skip")
  55.         (help @askbool-help)
  56.       )
  57.     )
  58.     (if
  59.       (= #choice 1)
  60.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  61.     )
  62.   )
  63. )
  64. (makedir #dest
  65.   (help @makedir-help)
  66.   (infos)
  67. )
  68.  
  69. ;----------------------------
  70.  
  71. (copyfiles
  72.   (help @copyfiles-help)
  73.   (source ("%s.Slave" @app-name))
  74.   (dest #dest)
  75. )
  76. (if
  77.   (exists ("%s.newicon" @app-name))
  78.   (set #icon
  79.     (askchoice
  80.       (prompt "\nWhich icon do you like to install ?\n")
  81.       (default 0)
  82.       (choices "Normal" "NewIcon")
  83.       (help @askchoice-help)
  84.     )
  85.   )
  86.   (set #icon 0)
  87. )
  88. (select #icon
  89.   (set #icon ("%s.inf" @app-name))
  90.   (set #icon ("%s.newicon" @app-name))
  91. )
  92. (copyfiles
  93.   (help @copyfiles-help)
  94.   (source #icon)
  95.   (newname ("%s.info" @app-name))
  96.   (dest #dest)
  97. )
  98. (if
  99.   (exists #readme-file)
  100.   (copyfiles
  101.     (help @copyfiles-help)
  102.     (source #readme-file)
  103.     (dest #dest)
  104.   )
  105. )
  106. (if
  107.   (exists ("%s.info" #readme-file))
  108.   (copyfiles
  109.     (help @copyfiles-help)
  110.     (source ("%s.info" #readme-file))
  111.     (dest #dest)
  112.   )
  113. )
  114. (if
  115.   (= #sub-dir "")
  116.   ("")
  117.   (
  118.     (set #dest (tackon #dest #sub-dir))
  119.     (makedir #dest
  120.       (help @makedir-help)
  121.     )
  122.   )
  123. )
  124.  
  125. (copyfiles
  126.     (help @copyfiles-help)
  127.     (source "OSEmu.400")
  128.     (dest #dest)
  129.     (infos)
  130. )
  131.  
  132. ;----------------------------
  133.  
  134. (message "\n\n\n\n\n\n\Please insert Pinkie Disk 1 in any drive"
  135. )
  136.  
  137. (copyfiles (source "Empty:")
  138.            (dest #dest)
  139.            (pattern "~(devs|s)")
  140. )
  141.  
  142.  
  143. (message "\n\n\n\n\n\n\Please insert Pinkie Disk 2 in any drive"
  144. )
  145.  
  146. (copyfiles (source "Empty:")
  147.            (dest #dest)
  148.            (all)
  149. )
  150.  
  151. (message "\n\n\n\n\n\n\Please insert Pinkie Disk 3 in any drive"
  152. )
  153.  
  154. (copyfiles (source "Empty:")
  155.            (dest #dest)
  156.            (all)
  157. )
  158.  
  159. ;----------------------------
  160.  
  161. (run ("Delete %s ALL QUIET FORCE" #cleanup))
  162.  
  163. (exit)
  164.